package com.basicsys.modules.util;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.basicsys.modules.sys.controller.BaseController;
@Controller
@RequestMapping("text")
public class TextController extends BaseController{
	@Resource
	private BookService bookService;
	@RequestMapping("/text")
	public void getText(String path) throws Exception{
//		 Doc2HtmlUtil coc2HtmlUtil = Doc2HtmlUtil.getDoc2HtmlUtilInstance();
//		  System.out.println(path);  
//		 File file = null;
//	        FileInputStream fileInputStream = null;
//	        file = new File(path);
//	        String substring = path.substring(0, 2);
//	        System.out.println(substring);
//	        fileInputStream = new FileInputStream(file);
//	        String file2Html = coc2HtmlUtil.file2Html(fileInputStream, path.substring(0, 2),PostfixUtil.getPostfix(path),file.getName());
//	     System.out.println(file2Html);
//	}
//	@RequestMapping("/excel")
//	public void getExcel(String path) throws Exception{
//		List<Book> books = bookService.getList();
//		ExcelUtil.excelOut(books,path);
//	}
//	@RequestMapping("/inputExcel")
//	public void getIntputExcel(String path) throws Exception{
//		List<Book> books = ExcelUtil.ExcelIn(path);
//		for (Book book : books) {
//			bookService.save(book);
//		}
	}
}
